package com.lfy.domian;

import org.springframework.beans.BeansException;
import org.springframework.beans.factory.InitializingBean;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.config.BeanFactoryPostProcessor;
import org.springframework.beans.factory.config.ConfigurableListableBeanFactory;
import org.springframework.context.annotation.Bean;
import org.springframework.data.redis.core.index.PathBasedRedisIndexDefinition;
import org.springframework.stereotype.Component;

@Component
public class TestPro implements InitializingBean,BeanFactoryPostProcessor {
    @Autowired
    private A a;


    @Override
    public void afterPropertiesSet() throws Exception {
        System.out.println(a+"》》》是否为空？");
    }
    @Bean
    public BeanFactoryPostProcessor beanFactoryPostProcessor(){
        return configurableListableBeanFactory -> {
            System.out.println("TestPro：BeanFactoryPostProcessor");
        };
    }

    @Override
    public void postProcessBeanFactory(ConfigurableListableBeanFactory configurableListableBeanFactory) throws BeansException {
    }
}
